package com.iss.ssm0531.service;

import com.iss.ssm0531.dao.UserDAO;
import com.iss.ssm0531.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserService {

    @Autowired
    private UserDAO userDAO;

    public Boolean save(User user){
      // return userDAO.insert(user)>0;
        return  true;
    }

    public List<User> findAll() {
        return userDAO.selectAll();
    }

    public User getSingle(Integer userId) {
      //  return  userDAO.selectByPrimaryKey(userId);

        return  null;
    }
}
